<template>
  <a-modal v-model:visible="visible" title="医疗专业人员模板" :footer="null" style="width: 80%" :destroyOnClose="true">
    <iframe class="iframe" :src="path" style="width: 100%; height: 70vh"></iframe>
    <!-- <a-table :columns="columns" :data-source="tableData" :pagination="false">
      <template #bodyCell="{ column, record }">
        <template v-if="column.key === 'companyName'">
          {{ record.companyName }}
        </template>
      </template>
    </a-table> -->
  </a-modal>
</template>

<script lang="ts" setup>
  import { computed } from 'vue'
  const props = defineProps({
    visible: { type: Boolean, default: false },
    templateId: { type: String, default: '' },
  })
  const path = computed(() => {
    return `${import.meta.env.VITE_SUBMODULE_QUESTION_PATH}/setting?templateId=${props.templateId}&isEdit=0`
  })
  console.log('VITE_SUBMODULE_QUESTION_PATH: ', import.meta.env.VITE_SUBMODULE_QUESTION_PATH)
  console.log('path: ', path)
  // const tableData = ref([])
  // const columns = [
  //   {
  //     title: '名称',
  //     dataIndex: 'companyName',
  //     key: 'companyName',
  //   },
  //   {
  //     title: '类型',
  //     key: 'companyLabel',
  //     dataIndex: 'companyLabel',
  //   },
  //   {
  //     title: '是否必填',
  //     dataIndex: 'createTime',
  //     key: 'createTime',
  //   },
  //   {
  //     title: '描述',
  //     dataIndex: 'createTime',
  //     key: 'desc',
  //   },
  // ]
  const emits = defineEmits(['update:visible'])
  const visible = computed({
    get: () => props.visible,
    set: (val) => emits('update:visible', val),
  })
</script>

<style lang="less" scoped></style>
